<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <p>07</p>
    <button id="btn">btn</button>
    <!-- 
        history对象保存了用户在浏览器中访问页面的历史记录
        语法：history.back()
        功能:回到历史记录的上一步
     -->
    <script>
        var btn = document.getElementById("btn")
        btn.onclick = function(){
            history.back();
        }
    </script>
</body>
</html>